tests/testiconview-keynav.c: Use accessor functions to access GtkWidget
authorJavier Jardón <jjardon@gnome.org>
Sun, 15 Aug 2010 22:33:40 +0000 (00:33 +0200)
committerJavier Jardón <jjardon@gnome.org>
Sun, 22 Aug 2010 16:30:10 +0000 (18:30 +0200)
tests/testiconview-keynav.c

index 367a2274910ddd461a1c186338be73b09d0e34ec..928fbc5d93ac8363009aa674a799f74ba7fd0bb3 100644 (file)
@@ -213,11 +213,15 @@ static void
 header_style_set (GtkWidget *widget,
                   GtkStyle  *old_style)
 {
+  GtkStyle *style;
+
+  style = gtk_widget_get_style (widget);
+
   g_signal_handlers_block_by_func (widget, header_style_set, NULL);
   gtk_widget_modify_bg (widget, GTK_STATE_NORMAL,
-                        &widget->style->base[GTK_STATE_NORMAL]);
+                        &style->base[GTK_STATE_NORMAL]);
   gtk_widget_modify_fg (widget, GTK_STATE_NORMAL,
-                        &widget->style->text[GTK_STATE_NORMAL]);
+                        &style->text[GTK_STATE_NORMAL]);
   g_signal_handlers_unblock_by_func (widget, header_style_set, NULL);
 }